{- This file is part of funbot.
 -
 - Written in 2015, 2016 by fr33domlover <fr33domlover@riseup.net>.
 -
 - ♡ Copying is an act of love. Please copy, reuse and share.
 -
 - The author(s) have dedicated all copyright and related and neighboring
 - rights to this software to the public domain worldwide. This software is
 - distributed without any warranty.
 -
 - You should have received a copy of the CC0 Public Domain Dedication along
 - with this software. If not, see
 - <http://creativecommons.org/publicdomain/zero/1.0/>.
 -}

{-# LANGUAGE OverloadedStrings #-}

module FunBot.Commands
    ( commandSet
    )
where

import FunBot.Commands.Access
import FunBot.Commands.Channels
import FunBot.Commands.Feeds
import FunBot.Commands.History
import FunBot.Commands.Info
import FunBot.Commands.Locations
import FunBot.Commands.Memos
import FunBot.Commands.Misc
import FunBot.Commands.Puppet
import FunBot.Commands.Repos
import FunBot.Commands.Settings
import FunBot.Commands.Shortcuts
import FunBot.Commands.UserOptions
import FunBot.Settings.Sections.Access (ignoreDemons)
import FunBot.Types
import Network.IRC.Fun.Bot.Types

-- | The main command set, the only one currently
commandSet = CommandSet
    { csetPrefix   = '!'
    , csetCommands = map ign
        [ cmdHelp'
        , cmdVersion
        , cmdInfo
        , cmdEcho
        , cmdPTell
        , cmdCTell
        , cmdPAsk
        , cmdCAsk
        , cmdGet
        , cmdSet
        , cmdReset
        , cmdEnable
        , cmdDisable
        , cmdAddSpec
        , cmdDeleteSpec
        , cmdAddRepo
        , cmdDeleteRepo
        , cmdVisit
        , cmdJoin
        , cmdLeave
        , cmdQuote
        , cmdFolks
        , cmdShowOpts
        , cmdEnableHistory
        , cmdDisableHistory
        , cmdSetLines
        , cmdEraseOpts
        , cmdAddShortcut
        , cmdDeleteShortcut
        , cmdShowHistory
        , cmdAddFeed
        , cmdDeleteFeed
        , cmdWhere
        , cmdWhereLocal
        , cmdWhereGlobal
        , cmdAddWhereLocal
        , cmdRemoveWhereLocal
        , cmdAddWhereGlobal
        , cmdRemoveWhereGlobal
        , cmdPuppetStart
        , cmdPuppetEnd
        , cmdPuppetSay
        , cmdPuppetEcho
        , cmdIgnore
        , cmdUnignore
        ]
    }
    where
    ign c = c { cmdRespond = ignoreDemons $ cmdRespond c}

